/*
 * SysControl.cpp
 *
 *  Created on: 2012-10-22
 *      Author: yangentao@gmail.com
 */

#include "SysControl.h"

SysControl::SysControl(){
	addStyle(WS_CHILD | WS_VISIBLE );
}

SysControl::~SysControl() {
}
DWORD SysControl::getDefaultExStyle() {
	return 0;
}
DWORD SysControl::getDefaultStyle() {
	return  WS_TABSTOP | BS_PUSHBUTTON;
}
LPCTSTR SysControl::getClassName() {
	return WC_BUTTON;
}
bool SysControl::create(HWND parent, String text, Rect rect, UINT id) {
	WideText wt(text.buffer(), text.size());
	HWND w = WndUtil::createControl(getDefaultExStyle(), getClassName(), wt.buf, getDefaultStyle(), rect, parent, id);
	Window::subclassWindow(w);
	return w != 0;
}




